You are here: Statements and Functions > IncEntCost
Syntax samples
INCENTCOST <expression>
INCENTCOST 15
INCENTCOST -15
Enables you to increment the cost (positively or negatively) of the current entity by a given amount. Use this function to add to the entity’s actual, accumulated dollar amount.
Please note
When working with new entities created through a ROUTE statement, use INCENTCOST to assign an initial cost to entities. Initial entity cost defined for an entity in the cost module applies to entities entering the system through a scheduled arrival, the CREATE statement, or the ORDER statement.
Operation and Move logic.
Components
<expression>
The positive or negative change to the value of cost.
Example
The logic below allows you to add an initial cost to an entity implicitly created through the ROUTE statement. In the following example, a Pallet of entities, PalletA, arrives at Unload_Loc where workers unload entities called Box every 20 seconds until the pallet is empty. ProModel determines the number of Boxes unloaded from PalletA by the value of PalletA’s attribute, Qty_Attr. In Move Logic, the statement "IncEntCost 10" adds an initial cost of 10 dollars to each implicitly created entity, Box.
Process Table
Entity |
Location |
Opn (min) |
---|---|---|
PalletA |
Unload_Loc |
int x = 0 WHILE x < Qty_Attr DO {INC x WAIT 20 sec ROUTE 2} ROUTE 1 |
Routing Table
Blk |
Output |
Destination |
Rule |
Move Logic |
---|---|---|---|---|
1 |
PalletA |
Exit |
FIRST 1 |
|
2*
|
Box |
Conveyor1 |
FIRST 1 |
INCENTCOST 10 |
GETCOST, GETRESRATE(), INCLOCCOST, INCRESCOST, and SETRATE.